package com.skynet.supervision.utils.functional;

@FunctionalInterface
public interface ThrowableVoidConsumer<E extends Throwable> {
    void apply() throws E;

    default VoidConsumer toVoidConsumer() {
        return () -> {
            try {
                this.apply();
            } catch (Throwable e) {
                FuncUtils.uncheckedThrow(e);
            }
        };
    }
}
